<!DOCTYPE html>
<html>
<head>
	<head>
    <include file="Public/head"/>
    <php> D('Member')->need_login();</php>
</head>
        <style>
        #divHide {
            background: #000;
            filter: alpha(opacity=40); /*IE透明度*/
            opacity: 0.4; /*其他透明度*/
            position:absolute;
            top:0px;
            left:0px;
            width:100%;
            height:100%;
            z-index:100;
            display:none;
            text-align:center
       }
       #tandiv-pic{
           text-align:center;
           width:600px;
           height:600px;
           position:fixed;
           left:50%;;
           margin-left:-300px;
           top:50%;
           margin-top:-300px;
           background-color:#fff;
           z-index:999999999999;
           padding-top:50px
       }
       #tandiv-pic img{
           width:100%
       }
       </style>
</head>
<body>
	<include file="Public/header"/>
     <!--弹层，当浏览器是IE并且是IE11以下版本是会弹出-->
    
    <!--弹层，当浏览器是IE并且是IE11以下版本是会弹出--> 
     <script>
            //检查当前浏览器是否为IE 并且 版本低于IE10
    //获取ie浏览器版本
    function getBrowserVersion() {
        var userAgent = navigator.userAgent.toLowerCase();
        if (userAgent.match(/msie ([\d.]+)/) != null) {
            //ie6--ie9
            uaMatch = userAgent.match(/msie ([\d.]+)/);
            return uaMatch[1];
        } else if (userAgent.match(/(trident)\/([\w.]+)/)) {
            uaMatch = userAgent.match(/trident\/([\w.]+)/);
            switch (uaMatch[1]) {
                case "4.0":
                    return "8";
                    break;
                case "5.0": return "9";
                    break; case "6.0":
                        return "10";
                        break;
                case "7.0":
                    return "11";
                    break;
                default:
                    return "0";
            }
        }
        return "0";
    }
    var browserVersion = getBrowserVersion();
    if (browserVersion < 11 && browserVersion != "0") {
        $("#lblMsg").html("系统检测到您的浏览器为IE" + browserVersion + "或者更低的版本，浏览器兼容性较差，影响系统体验，推荐您使用以下的浏览器：");
        // 显示遮罩层
        //$("#divHide").height(document.body.scrollHeight);
       // $("#divHide").width(document.body.scrollWidth);
        $("#divHide").show();
        $("#tandiv-pic").show();
        //$("#browserDownLoad").css("display", "");

    }
    else {
        $("#divHide").hide();
        $("#tandiv-pic").hide();
    }
      </script>
	<div class="layout1">
		
		<!--dafasfasf-->
		<div data-am-widget="slider" class="am-slider am-slider-a2" data-am-slider='{&quot;directionNav&quot;:false}'>
		    <ul class="am-slides">
		        <li>
		            <img src="__PUBLIC__/images/banner1.jpg" alt="" alt=""/>
		        </li>
		        <li>
		            <img src="__PUBLIC__/images/banner2.jpg" alt="" alt=""/>
		        </li>
		    </ul>
		</div>
		
		 <div class="container index-count">
			<div class="am-g">
	          	<div class="am-u-md-4">
					<div class="count-desc">志愿者累计</div>
					<div class="count-number">						
						<volist name="volunteer" id="vol">
							<span><i rel="{$vol}"></i></span>
						</volist>
					</div>
				</div>
				<div class="am-u-md-4">
					<div class="count-desc">组织累计</div>
					<div class="count-number">
						<volist name="group" id="vol">
							<span><i rel="{$vol}"></i></span>
						</volist>
					</div>
				</div>
				<div class="am-u-md-4">
					<div class="count-desc">开展活动累计</div>
					<div class="count-number">
						<volist name="event" id="vol">
							<span><i rel="{$vol}"></i></span>
						</volist>
					</div>
				</div>
			</div>
		</div>
		<!--加载活动-->
       {:W('Event/HomeBlock/render')}
       <!--加载优秀个人、组织-->
       {:W('Group/HomeBlock/render')}
	
            <!--加载新闻-->
       {:W('News/HomeBlock/render')}
		<div class="container ranking">
			<div class="am-g">
	          <div class="am-padding-1-sm am-u-md-6 am-u-lg-4">
	            <div class="item">
	              	<h3 class="item-title">
	              		组织影响力
	              		<a href="javascript:;" title="排名规则" class="am-icon-faq am-icon-question-circle" data-am-popover="{content: '发起活动占70%，参加人数占30%。', trigger: 'hover focus'}"></a>
	              	</h3>
	              	<table class="am-table">
					    <thead>
					        <tr>
					            <th>排名</th>
					            <th>名称</th>
					        </tr>
					    </thead>
					    <tbody>
					    	<volist name="group_list" id="data">
						        <tr>
						            <td><span class="ranking-number">{$i}</span></td>
						            <td>{$data.title}</td>
						        </tr>					    		
					    	</volist>
					        
					    </tbody>
					</table>
	            </div>
	          </div>
	          <div class="am-u-md-6 am-u-lg-4 am-padding-1-sm">
	            <div class="item">
	              	<h3 class="item-title">
	              		个人荣誉榜
	              		<a href="javascript:;" title="排名规则" class="am-icon-faq am-icon-question-circle" data-am-popover="{content: '参加活动次数排名', trigger: 'hover focus'}"></a>
	              	</h3>
		            <table class="am-table">
					    <thead>
					        <tr>
					            <th>排名</th>
					            <th>名称</th>
					            <th>积分</th>
					        </tr>
					    </thead>
					    <tbody>
					    	<volist name="exenlent_list" id="data">
						        <tr>
						            <td><span class="ranking-number">{$i}</span></td>
						            <td>{$data.nickname}</td>
						            <td>{$data.score1}</td>
						        </tr>
					       	</volist>
					    </tbody>
					</table>
	            </div>
	          </div>

	          <div class="am-u-md-12 am-u-lg-4 am-hide-md">
	            <div class="item">
	            	<form action="{:U('Ucenter/member/login')}" method="post">
	              		<h3 class="item-title">志愿者登录</h3>	              
					  	<dl class="form-login clearfix font-14">
							<dd class="n1"><span></span><input class="name" name="username" type="text" placeholder="请输入帐号" maxlength="50" id="uid"></dd>
							<dd class="n2"><span></span><input class="password" name="password" type="password" placeholder="请输入密码" maxlength="32" id="upass"></dd>
							<dd style="height:21px;"><a class="pull-right" href="{:U('Ucenter/member/mi')}">忘记密码？</a></dd>
							<dd>
								<a class="register" href="{:U('Ucenter/member/register')}" target="register">注册</a> 
								<input class="sign" type="submit" value="登录" id="btn_login"> 
							</dd>
							<dd style="text-align:center;">
								<a href="##" class="am-icon-btn am-success am-icon-weixin"></a>
							 	<a href="##" class="am-icon-btn am-primary am-icon-qq"></a>
								<a href="##" class="am-icon-btn am-warning am-icon-weibo"></a>
							</dd>
					  	</dl>
				  	</form>
	            </div>
	          </div>
	        </div>
		</div>
            <div class="am-margin-bottom">
        </div>
	
	<script>
		$(function () {
        $("form").submit(function () {
            toast.showLoading();
            var self = $(this);
            $.post(self.attr("action"), self.serialize(), success, "json");
            return false;
            function success(data) {
                if (data.status) {
                    if (data.url==undefined&&quickLogin == "quickLogin") {
                        toast.success("{:L('_WELCOME_RETURN_')}{:L('_PERIOD_')}"+data.info, "{:L('_TIP_GENTLE_')}");
                        setTimeout(function () {
                            window.location.reload();
                        }, 1500);
                    } else {
                        toast.success("{:L('_WELCOME_RETURN_REDIRECTING_')}"+data.info, "{:L('_TIP_GENTLE_')}");
                        setTimeout(function () {
                            window.location.href = data.url;
                        }, 1500);
                    }
                } else {
                    toast.error(data.info, "{:L('_TIP_GENTLE_')}");
                    //self.find(".Validform_checktip").text(data.info);
                    //刷新验证码
                    $(".reloadverify").click();
                }
                toast.hideLoading();
            }
        });
        var verifyimg = $(".verifyimg").attr("src");
        $(".reloadverify").click(function () {
            if (verifyimg.indexOf('?') > 0) {
                $(".verifyimg").attr("src", verifyimg + '&random=' + Math.random());
            } else {
                $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
            }
        });
    });
	</script>
<!-- 底部 -->
<include file="Public/footer"/>
<!-- /底部 -->
</body>
</html>